package com.ly.heart.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ly.common.annotation.Excel;
import com.ly.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.experimental.Accessors;

import java.util.Date;

/**
 * 订单与其他业务关联表 （例如：采购订单与销售订单关联;采购订单与采购申请单关联;采购订单与询价单关联）
 * erp_order_relation_info
 * @author cxl
 * @date 2024-07-03
 */
@TableName ( "erp_order_relation_info" )
@ApiModel ( value = "订单与其他业务关联表", description = "订单与其他业务关联表" )
@Data
@Accessors(chain = true)
public class OrderRelationEntity {

    @TableId ( type = IdType.INPUT )
    private String id;

    @ApiModelProperty ( "源业务类型(0采购订单 1销售订单 2采购申请单 3询价单)" )
    @TableField ( "source_type" )
    @Excel ( name = "源业务类型(0采购订单 1销售订单 2采购申请单 3询价单)" )
    private String sourceType;

    @ApiModelProperty ( "源id" )
    @TableField ( "source_id" )
    @Excel ( name = "源id" )
    private String sourceId;

    @ApiModelProperty ( "关联类型(0采购订单)" )
    @TableField ( "relation_type" )
    @Excel ( name = "关联类型(0采购订单)" )
    private String relationType;

    @ApiModelProperty ( "关联id" )
    @TableField ( "relation_id" )
    @Excel ( name = "关联id" )
    private String relationId;

    @ApiModelProperty ( "创建人Id" )
    @TableField ( "create_by" )
    private String createBy;

    @ApiModelProperty ( "创建时间" )
    @TableField ( "create_time" )
    @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date createTime;

    @ApiModelProperty ( "更新人Id" )
    @TableField ( "update_by" )
    private String updateBy;

    @ApiModelProperty ( "更新时间" )
    @TableField ( "update_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd HH:mm:ss" )
    private Date updateTime;

    @ApiModelProperty ( "是否可用" )
    @TableField ( "is_used" )
    @Excel ( name = "是否可用" )
    private Integer isUsed;

}
